How to add a Search box to a Form
It is possible to include a Search section on a Form, enabling users to search for a record and update it:
A Search panel will slide out from the left when the Search icon is clicked. Users enter a search term and click Go to return matching records. When a record is clicked, values from that record will populate the data entry fields you have added to the Form, where they can be edited:
To add a Search section to a Form:
- Add data entry fields to your Form.
- Expand the Search section by clicking in the Search banner:
- Maximum Results is the maximum number of records that will be returned and displayed to users. Leave blank to return all records that match a user's search or enter a number to limit the number of records displayed.
- (Optionally) Lookup: provide a drop list of search values1.Details
Specify the name of a Lookup List to provide users with a drop list of possible search values:
In this example, Lookup points to the Condition status Lookup List:
Setting the search column (in the next step) and the Lookup list to be the same effectively restricts the search to values found in the Lookup list (only values found in the Lookup list will be matched):
Note: This does not restrict what value a user can enter in the search field (they do not have to select a value in the drop list) but of course only values in the Lookup list will be matched when the search is run. This does allow users to employ wildcards and to enter partial search terms, which means that more than one entry in the Lookup list can be matched (a search for good or go\* would match Good and Very good for example).
If the search column and the Lookup list are not the same (for example, the search column is Summary Data and the Lookup list is Condition status), the drop list simply provides suggested search values. A user can select from the drop list or enter any value and the search column will be searched for the specified value.
- Click to specify which column (or columns) will be searched by the user.
- In the Columns field, start keying a field name and select the required field when it displays:
This is the field that will be searched.
If required, add another search field by clicking Add search column again.
-
(Optionally) click to sort the result set alphabetically or numerically.
Start keying a field name in the Sort Columns field and select the required field when it displays.
Tip: A sort field does not need to be a search field selected in the previous step.
By default, fields are sorted A-Z, 0-9. To reverse the order, precede the field name with a minus sign, e.g. -NamLast.
If required, add another sort field by clicking Add sort column again.
- (Optionally) add a filter by clicking .
- Click to specify which column(s) of data will display when search results are returned.
- In the Results field, start keying a field name and select the required field when it displays.
- Save the Form.
A filter allows you to refine which records are returned by a user's search.
Tip: It is possible to use a filter on a Form without a Search box. In this case, a random record that meets the criteria specified by the filter will be displayed when a user accesses the Form. This can be useful for quality checks on records. Details here.
As this Form is intended for updating the Parties record of people (rather than organizations), we specify that only records where Party Type = Person
will be returned by the search:
Note: EMu (version 5.0 onwards): escaped double quotes are required around any search value that includes a space, New Zealand
for example, in order to match a value exactly: e.g. \"New Zealand\"
It is possible to specify more than one Results field:
In this example, both NamFirst and NamLast are specified: